import os
import sys
from google.appengine.ext.webapp import template
from google.appengine.ext import webapp


class HomeController(webapp.RequestHandler):
    def get(self):
        path = os.path.join(os.path.dirname(__file__), '../templates/index.html')
        self.response.out.write(template.render(path, {
                                                       'pagetitle' : 'My Garage | Home',
                                                       'title' : 'My Garage'}))

class StuffIBuiltController(webapp.RequestHandler):
    def get(self):
        path = os.path.join(os.path.dirname(__file__), '../templates/stuffibuilt.html')
        self.response.out.write(template.render(path, {
                                                       'pagetitle' : 'My Garage | Stuff I Built',
                                                       'title' : 'Stuff I Built'}))

class StuffIUseController(webapp.RequestHandler):
    def get(self):
        path = os.path.join(os.path.dirname(__file__), '../templates/stuffiuse.html')
        self.response.out.write(template.render(path, {
                                                       'pagetitle' : 'My Garage | Stuff I Use',
                                                       'title' : 'Stuff I Use'}))

class DemosController(webapp.RequestHandler):
    def get(self):
        path = os.path.join(os.path.dirname(__file__), '../templates/demos.html')
        self.response.out.write(template.render(path, {
                                                       'pagetitle' : 'My Garage | Demos',
                                                       'title' : 'Demos'}))

class AboutController(webapp.RequestHandler):
    def get(self):
        path = os.path.join(os.path.dirname(__file__), '../templates/about.html')
        self.response.out.write(template.render(path, {
                                                       'pagetitle' : 'My Garage | About',
                                                       'title' : 'About'}))